You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): show shortcuts on disabled history arrows - #46049
The desktop history arrows hide their tooltips when no history entry is available. Users cannot discover their configured shortcuts while either arrow is disabled.
Change
Anchor the tooltip to a wrapper while the arrow is disabled. The button keeps its native disabled behavior.
On an isolated macOS desktop instance with Alt+Left and Alt+Right configured, hovering the disabled forward arrow on main showed no tooltip. On this branch it showed Go forward (⌥Right), and clicking the arrow kept the current history entry.
The Chromium regression test reproduces the missing tooltip on main and verifies both configured shortcuts on this branch. All 16 focused tests and vp run check:changed passed.
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
This PR changes the test suite by +1 test cases (browser +1, unit 0, server 0).
New browser test files: apps/web/src/components/sidebar/SidebarChrome.browser.test.tsx.
Each browser test file costs CI seconds of module loading before its first test runs; a unit test costs milliseconds.
Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.
Macroscope's review found this PR approvable — Disabled sidebar history arrows now expose their shortcut tooltips through a hoverable wrapper. Navigation behavior and availability remain unchanged, keeping the change limited to presentation.
You can add or adjust custom eligibility rules. Learn more.
Reviewing files that changed from the base of the PR and between 68f88a1 and 51d3746.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The history navigation buttons now retain tooltip access when disabled. A browser test configures custom back and forward shortcuts, disables history navigation, and verifies that the tooltips show the shortcuts on Linux.
The history button is created separately and wrapped in a span when disabled. The browser test checks that disabled back and forward buttons show their configured shortcuts in tooltips.
This change shows configured keyboard shortcuts in tooltips on disabled history arrows while they stay non-interactive. It affects a small, localized part of the UI, has a browser test, and shows no merge-blocking risk.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: disabled desktop history arrows now show their configured keyboard shortcuts in tooltips. It follows the conventional commit form and matches the raw summary, the obje…
Description check
The description follows the template sections (Problem, Change, Scope, Verification). The problem, the wrapper-based change, the linked issue, and the verification steps are all clear. Before/after sc…
Linked Issues check
[#45549] The issue requires the effective keyboard shortcut to appear in the history arrow tooltip, including custom bindings, and to stay visible when the arrow is disabled while the action stays non…
Out of Scope Changes check
The whole-PR changes, per the summary, touch only apps/web/src/components/sidebar/SidebarChrome.tsx and apps/web/src/components/sidebar/SidebarChrome.browser.test.tsx. The SidebarChrome.tsx chan…
Full details: Title check
Explanation
The title names the main change: disabled desktop history arrows now show their configured keyboard shortcuts in tooltips. It follows the conventional commit form and matches the raw summary, the objectives, and the linked issue #45549.
Full details: Description check
Explanation
The description follows the template sections (Problem, Change, Scope, Verification). The problem, the wrapper-based change, the linked issue, and the verification steps are all clear. Before/after screenshots are included. The author also names the model and harness used. The Scope section gives a link to the issue but does not describe a maintainer request. This is a minor gap and does not block the check.
Full details: Linked Issues check
Explanation
[#45549] The issue requires the effective keyboard shortcut to appear in the history arrow tooltip, including custom bindings, and to stay visible when the arrow is disabled while the action stays non-interactive. At the reviewed head, HistoryNavigationButton in apps/web/src/components/sidebar/SidebarChrome.tsx builds the label from shortcutLabelForCommand(keybindings, 'navigation.back' | 'navigation.forward') using primaryServerKeybindingsAtom. The label is therefore driven by the effective configuration, not hardcoded. When enabled is false, the tooltip trigger renders a span wrapper around the disabled Button, so the tooltip anchors to the wrapper. The Button keeps disabled={!enabled} and its onClick is not reached while disabled. When the binding is unassigned, shortcutLabel is empty and no shortcut suffix is added, which matches the issue requirement that unassigned commands not advertise a shortcut. The key on SharedTooltipTrigger remounts the trigger when enabled state changes. The browser test in SidebarChrome.browser.test.tsx (per the summary) configures Alt+Left/Alt+Right and checks disabled-arrow tooltips on Linux Electron. Remaining uncertainty: I did not read the test file body, so the test assertions are taken from the summary and PR description. The issue's example format Alt+← differs from the existing helper output ⌥Right reported in the PR; the issue asks for the effective shortcut, and the helper is the existing source for that label. Unassigned-binding and live-update behavior are not separately verified in the PR evidence.
Full details: Out of Scope Changes check
Explanation
The whole-PR changes, per the summary, touch only apps/web/src/components/sidebar/SidebarChrome.tsx and apps/web/src/components/sidebar/SidebarChrome.browser.test.tsx. The SidebarChrome.tsx changes are limited to HistoryNavigationButton: the button is extracted into a variable, the tooltip trigger is keyed by enabled state, and a span wrapper is added while disabled. These changes directly implement the linked issue's disabled-arrow tooltip requirement. The test file change supports the same behavior. No unrelated code change is shown in the summary. The full file diff tool was unavailable (changed blobs missing from checkout), so I read the head file content directly and did not compare it line by line against the base.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:S10-29 changed lines (additions + deletions).takeover:needs-juliusTakeover done; route gate says Julius decidesvouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The desktop history arrows hide their tooltips when no history entry is available. Users cannot discover their configured shortcuts while either arrow is disabled.
Change
Anchor the tooltip to a wrapper while the arrow is disabled. The button keeps its native disabled behavior.
Scope
Fixes #45549.
Verification
On an isolated macOS desktop instance with
Alt+LeftandAlt+Rightconfigured, hovering the disabled forward arrow onmainshowed no tooltip. On this branch it showedGo forward (⌥Right), and clicking the arrow kept the current history entry.The Chromium regression test reproduces the missing tooltip on
mainand verifies both configured shortcuts on this branch. All 16 focused tests andvp run check:changedpassed.GPT-6.2 Sol via Codex.